package com.xquant.system.enums;

/**
 *数据源组合枚举
 * */
public enum DataSourceEnum {

    DATA_SOURCE_ONE ("DATA_SOURCE_ONE",4010L),

    DATA_SOURCE_HT_WD("HT-WD",4020L),

    DATA_SOURCE_HT_CH("HT-CH",4021L),

    DATA_SOURCE_CH_WD("CH-WD",4022L),

    DATA_SOURCE_HT_SZ("HT-SZ",4023L),

    DATA_SOURCE_HT_CH_WD("HT-CH-WD",4030L);

    private String value;

    private Long description;

    DataSourceEnum(String value, Long description) {
        this.value = value;
        this.description = description;
    }

    /**
     * 根据编码获取类型
     * */
    public static SetSameEnum getByValue(String value){
        for(SetSameEnum type : SetSameEnum.values()){
            if(type.getValue().equals(value)){
                return type;
            }
        }
        return null;
    }

    public String getValue() {
        return value;
    }

    public Long getDescription() {
        return description;
    }
}
